@(path: String, types: String)(implicit session: Session)

<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("blast/css/bootstrap.css")">
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("blast/css/blast.css")">
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("blast/css/font-awesome.min.css")">

<script src="@routes.Assets.versioned("blast/js/jquery-3.1.1.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/d3.v4.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/bootstrap.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/blast.js")" type="text/javascript"></script>


<div id="resultContent">

</div>

<script>

        $(function () {

            $.ajax({
                url: "/capdb/tools/blastResult?path=@path" + "&types=@types",
                type: "post",
                success: function (data) {
                    $("#resultContent").html(data.html);

                    if ("@types" === "blastnGenome") {
                        $.each(data.block, function (i, v) {
                            const id = "#synteny" + v.index;
                            const iframe = "#iframe" + v.index;
                            const data = v.data;
                            const relate = v.relate;
                            const index = v.index + "-";
                            DisplayBlock(id, data, relate, index);
                            const name = data.B.name;
                            const start = data.B.min;
                            const end = data.B.max;
                        })
                    } else {
                        $(".blastDraw").hide();
                    }

                    $(".others").hide();

                    let host1 = window.location.host;
                    let parentHref = 'http://' + host1 + '/capdb/tools/blastResultBefore';
                    window.parent.postMessage("success", parentHref);

                }
            })

        });


        function toMoreInfo(name) {
            window.open("/capdb/browse/geneInfoPageByGeneId?geneId=" + name);
        }

        function DownByName(name) {
            window.location.href = "/downloadBlastByName?name=" + name + " &types=@types"  ;
        }

        function DownByRange(name, obj) {
            window.location.href = "/downloadBlastByRange?name=" + name + "&range=" + $("." + obj).text() + "&types=@types";
        }

        function getHeight() {
            return $("#resultContent").outerHeight();
        }


</script>